{template 'header'}
            <div class="row">
                <div class="col-md-12">

                <div class="panel panel-info">

                    <div class="panel panel-default">
                        <div class="panel-body">
                        
                        <div class="page-toolbar">
                            <form action="{php echo webUrl('product/index/product')}" method="post" class="form-horizontal" form-jump='1'>
                            <div class="col-sm-6 pull-right">
                                <div class="input-group">
                                    <input type="text" class="input-sm form-control" name="product_name" value="{$name}" placeholder="请输入产品名称搜索"> <span class="input-group-btn">
                                    <button class="btn btn-primary" type="submit"> 搜索</button> </span>
                                </div>
                            </div>
                            </form>
                        </div>
                    <form action="{php echo webUrl('product/index/product_editall')}" method="post" enctype="multipart/form-data" class="form-horizontal ">
                    <input type="hidden" name="token" value="{$_W['token']}">
                        <table class="table-striped table-bordered table-hover dataTables-example table">
                        <thead class="navbar-inner">
                        <th>ID</th>
                        <th >产品主图</th>
                        <th>产品名称</th>
                        <th>产品价格</th>
                        <th >产品分类</th>
                        <th >创建时间</th>
                        <th >首页推荐显示</th>                                                <th >是否显示</th>
                        <th >操作</th>

                     </thead>
                    <tbody id="level-list">
                      {loop $list $index $item}
                     <tr>
                        <td>
                         	<div class="type-parent" style="line-height:16px">
                        		<!-- <input type="checkbox" name="xuanze[]" value="{$item['product_id']}"> -->
                                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{php echo $i++;}
                            </div>
                            
                        </td>
                        <td>
                            <div class="type-parent">
                                <img src="{php echo tomedia($item['product_thumb']);}" width="60" height="60" />
                            </div>
                        </td>
                        <td>
                            <div class="type-parent">{$item['product_name']}</div>
                        </td>
                        <td>
                            <div class="type-parent">{$item['product_current_price']}</div>
                        </td>
                        <td>
                            <div class="type-parent">{$item['type_name']}</div>
                        </td>
                        <td>
                            <div class="type-parent">{$item['add_time']}</div>
                        </td>
                        <td>
                            <span class="{if $item['is_recom']==1}label label-warning{else}label{/if}" data-ajax="{php echo webUrl('product/index/appoint_ajax_recom',array('product_id'=>$item['product_id']))}" list-class="{if $item['is_recom']==1}label{else}label label-warning{/if}" list-html="{if $item['is_recom']==1}否{else}是{/if}">
                            {if $item['is_recom']==1}是{else}否{/if}</span>
                        </td>                        <td>
                            <span class="{if $item['is_show']==1}label label-warning{else}label{/if}" data-ajax="{php echo webUrl('product/index/appoint_ajax_recom',array('product_id'=>$item['product_id']))}" list-class="{if $item['is_show']==1}label{else}label label-warning{/if}" list-html="{if $item['is_show']==1}否{else}是{/if}">
                            {if $item['is_show']==1}是{else}否{/if}</span>
                        </td>
                        <td>
                           <a href="{php echo webUrl('product/index/product_edit',array('product_id'=>$item['product_id']))}" title="编辑" class="btn btn-sm btn-primary"><i class="fa fa-edit"></i>编辑</a>
                            <a href="javascript:vord(0)" data-ajax="{php echo webUrl('product/index/product_del',array('product_id'=>$item['product_id']))}" title="确认删除？" class="btn btn-sm btn-danger  "><i class="fa fa-remove"></i>删除</a>
                        </td>
                    </tr>
                    {/loop}
                </tbody>
           </table>        
                
            </div>
<!--             <div style="padding-top: 10px;float: left;">
            	<input type="hidden" value="0" name="piliang" id="piliang" />
            	 &nbsp;&nbsp;&nbsp;
                 <a href="javascript:selectBox(0)" class="btn btn-sm quanxuan"  style="background-color: #FFDEAD;"><i class="fa fa-dot-circle-o"></i>&nbsp;全选</a>
                 &nbsp;&nbsp;&nbsp;
                 <a href="javascript:fanselectBox(0)" class="btn btn-sm quanxuan"  style="background-color: #FFDEAD;"><i class="fa fa-dot-circle-o"></i>&nbsp;反选</a>
                  &nbsp;&nbsp;&nbsp;
                  <button type="submit" onclick="document.getElementById('piliang').value=1" class="btn btn-sm btn-danger"><i class="fa fa-remove"></i> 批量删除</button>
                  &nbsp;&nbsp;&nbsp;
                  <button type="submit" onclick="document.getElementById('piliang').value=2" class="btn btn-sm" style="background-color: #FFDEAD;"><i class="fa fa-edit"></i> 批量显示</button>
                  &nbsp;&nbsp;&nbsp;
                  <button type="submit" onclick="document.getElementById('piliang').value=3" class="btn btn-sm"><i class="fa fa-edit"></i> 批量不显示</button>
            </div> -->
            <div style="padding-top: 10px;float: right;">
                {$pager}
            </div>
            <div style="width:100%; height:20px; clear:both">
            </div>
                </form>
                </div>
            </div><!--/.row-->
<script>
	function selectBox(){
        var checkboxis = document.getElementsByName("xuanze[]");  
        for (var i=0; i<checkboxis.length; i++){ 
            checkboxis[i].checked = true; 
        }  
    }
	function fanselectBox(){
        var checkboxis = document.getElementsByName("xuanze[]");  
        for (var i=0; i<checkboxis.length; i++){ 
            checkboxis[i].checked = !checkboxis[i].checked;  
        }  
    } 
</script>
    {template 'footer'}